<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<body>

<form id='myform' name='myform' method="post" action="addlink.action"  target='_blank'>
<input type='hidden' name='url' />
<input type='hidden' name='title'/>
<input type='hidden' name='intro'/>
</form>
<script language="javascript">
if (external.menuArguments){
	var parentwin = external.menuArguments;
	if (parentwin.document.selection) {
		var sel = parentwin.document.selection.createRange().text;
	}	
	if (!sel) {
		var sel = '';
	}
	var url="";
	try{
		url = window.parentwin.document.URL;;
	}
	catch(e)
	{
		url = parentwin.location.href;
	}	
	
	if (typeof(url ) == "undefined")
		url = parentwin.location.href;


	var title = parentwin.document.title;	
	if (parentwin.event.srcElement.tagName == "A") {
		url = parentwin.event.srcElement.getAttribute("HREF");
		title = parentwin.event.srcElement.innerText;
	}

	myform.url.value=url;
	myform.title.value=title;
	myform.intro.value=sel;
	void(window.open('addlink.action?url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title)+'&intro='+encodeURIComponent(sel),'_blank','scrollbars=no,width=760,height=800,left=75,top=50,status=no,resizable=yes'))
} else {
	history.go(-1);
}
</script>
</body>
</html>